object FormRelComissao: TFormRelComissao
  Tag = 11
  Left = 411
  Top = 99
  Width = 326
  Height = 355
  Caption = 'Relat'#243'rios de Comiss'#245'es'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  Position = poScreenCenter
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel
    Left = 3
    Top = 47
    Width = 31
    Height = 13
    Caption = 'Banco'
  end
  object Label2: TLabel
    Left = 3
    Top = 87
    Width = 121
    Height = 13
    Caption = 'Agente (Grupo de postos)'
  end
  object Label3: TLabel
    Left = 235
    Top = 5
    Width = 38
    Height = 13
    Caption = 'Per'#237'odo'
  end
  object Label4: TLabel
    Left = 3
    Top = 127
    Width = 33
    Height = 13
    Caption = 'Cidade'
  end
  object SpeedButton1: TSpeedButton
    Left = 5
    Top = 205
    Width = 116
    Height = 27
    Caption = 'E-mail Guias'
    Glyph.Data = {
      36080000424D3608000000000000360400002800000020000000200000000100
      08000000000000040000C40E0000C40E00000001000000000000000000000000
      80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA
      A6000020400000206000002080000020A0000020C0000020E000004000000040
      20000040400000406000004080000040A0000040C0000040E000006000000060
      20000060400000606000006080000060A0000060C0000060E000008000000080
      20000080400000806000008080000080A0000080C0000080E00000A0000000A0
      200000A0400000A0600000A0800000A0A00000A0C00000A0E00000C0000000C0
      200000C0400000C0600000C0800000C0A00000C0C00000C0E00000E0000000E0
      200000E0400000E0600000E0800000E0A00000E0C00000E0E000400000004000
      20004000400040006000400080004000A0004000C0004000E000402000004020
      20004020400040206000402080004020A0004020C0004020E000404000004040
      20004040400040406000404080004040A0004040C0004040E000406000004060
      20004060400040606000406080004060A0004060C0004060E000408000004080
      20004080400040806000408080004080A0004080C0004080E00040A0000040A0
      200040A0400040A0600040A0800040A0A00040A0C00040A0E00040C0000040C0
      200040C0400040C0600040C0800040C0A00040C0C00040C0E00040E0000040E0
      200040E0400040E0600040E0800040E0A00040E0C00040E0E000800000008000
      20008000400080006000800080008000A0008000C0008000E000802000008020
      20008020400080206000802080008020A0008020C0008020E000804000008040
      20008040400080406000804080008040A0008040C0008040E000806000008060
      20008060400080606000806080008060A0008060C0008060E000808000008080
      20008080400080806000808080008080A0008080C0008080E00080A0000080A0
      200080A0400080A0600080A0800080A0A00080A0C00080A0E00080C0000080C0
      200080C0400080C0600080C0800080C0A00080C0C00080C0E00080E0000080E0
      200080E0400080E0600080E0800080E0A00080E0C00080E0E000C0000000C000
      2000C0004000C0006000C0008000C000A000C000C000C000E000C0200000C020
      2000C0204000C0206000C0208000C020A000C020C000C020E000C0400000C040
      2000C0404000C0406000C0408000C040A000C040C000C040E000C0600000C060
      2000C0604000C0606000C0608000C060A000C060C000C060E000C0800000C080
      2000C0804000C0806000C0808000C080A000C080C000C080E000C0A00000C0A0
      2000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0E000C0C00000C0C0
      2000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0A000808080000000
      FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFFF6F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFFF6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFF6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFF08F7F70708FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFF07F7A4A4F7F508F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFEDF6FF08F7A4A4A40707F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFF607F6FFF6FFF6F5A49BA4ED07F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FF0708F6FFF6F6F6FFFF08F5A4A3A4F707F6F6FFFFFFFFFFFFFFFFFFFFFFFFFF
      FFF5F6F6FFF6FFFFFFF6FFFFF607E4A3A4F70707FFFFFFFFFFFFFFFFFFFFFFFF
      F6F5FFFFFFFFF6F6F609F6F6F6F6FFF6F5F79B9BF70708F6FFFFFFFFFFFFFFFF
      0707FFFFFFFFFFFFFFFFF6F6F6F6F6FFF6F609ED9B9BA4AC08F6FFFFFFFFFFFF
      0708FFFFFFFFF6F60808FFFFFFF6F6F6F60909FFF609EDA39B09FFFFFFFFFFFF
      07F6FFFFFFFFFFF607F5F509F6FFF6F6F6F60909F609F609A3F6FFFFFFF60807
      07FFFFFFFFFFFFFFF6F6F6F5EDF509F6F609FF09F609F609A3F6FFFFF6ECA4A4
      07FFFFFFFFFFF60708FFFFFFF60909ED090909F609F6F6ECEDFFFF09E3E49BE3
      F6FFFFF6F6F6FFF60707F50909F6FFFF090909F6F6F6F6A309FF09ECE4E3DBED
      FFFFFFF6F6F6F6FFFFF6F609F5F50709F6FFF6F6F6F609A3F6FF09EDEC9A9A09
      FFF6FFF6FFFFF6FFFFFFFFFFFFFFF607F5EDFFF6FFF607A4FFFF090909E39B09
      FFFF09ED07FFFFFFFFFFFFFFFFFFF6F6F6F6F6F6F6FFF7F7FFFFED090909ECE3
      EC09E4A3E3F5FFFFFFFFFFFFFFFFFFFFF6EDF70707F6A407FFFFEDFFFFFF09EC
      E3E4ECECE3E309FFFFFFFFFFFFFFFFFFFF079BA4F707A408FFFF0709FFFFFFFF
      09EC0909ECE3E3F5FFFFFFFFFFFFFFFFFF079BA5F7F7F7F6FFFFF6EDFFFFFF09
      090909090909E3A307F6FFFFFFFFFFFFF6F7F70707F707FFFFFFFFF607090909
      09090909ECECECE4A4F7070708F6FFFFF607F70707A4F6FFFFFFFFFFF607F5F5
      090909090909ECECF5F6F608070707070808080807A4F6FFFFFFFFFFFFFFFFF6
      F5EC0909ECECE4ED08FFFFFFFFFFFFF607F507F5EDEDFFFFFFFFFFFFFFFFFFFF
      09ECEDE4E40909FFFFFFFFFFFFFFFFFFFFFFF60808FFFFFFFFFFFFFFFFFFFFFF
      FF0909F6FFFFFFF6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6F6F6F6
      F6F6F6FFFFFFFFF6F6F6F6F6F6FFFFFFFFFFFFFFFFFFFFFFFFF6FFF6FFF6F6F6
      F6F6F6F6F6F6FFFFFFFFFFFFFFFFFFF6F6FFFFFFFFF6FFF6FFFF}
    OnClick = SpeedButton1Click
  end
  object lbemails: TLabel
    Left = 6
    Top = 242
    Width = 27
    Height = 13
    Caption = '.........'
  end
  object SpeedButton2: TSpeedButton
    Left = 128
    Top = 205
    Width = 116
    Height = 27
    Caption = 'E-mail Cr'#233'ditos'
    Glyph.Data = {
      36080000424D3608000000000000360400002800000020000000200000000100
      08000000000000040000C40E0000C40E00000001000000000000000000000000
      80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA
      A6000020400000206000002080000020A0000020C0000020E000004000000040
      20000040400000406000004080000040A0000040C0000040E000006000000060
      20000060400000606000006080000060A0000060C0000060E000008000000080
      20000080400000806000008080000080A0000080C0000080E00000A0000000A0
      200000A0400000A0600000A0800000A0A00000A0C00000A0E00000C0000000C0
      200000C0400000C0600000C0800000C0A00000C0C00000C0E00000E0000000E0
      200000E0400000E0600000E0800000E0A00000E0C00000E0E000400000004000
      20004000400040006000400080004000A0004000C0004000E000402000004020
      20004020400040206000402080004020A0004020C0004020E000404000004040
      20004040400040406000404080004040A0004040C0004040E000406000004060
      20004060400040606000406080004060A0004060C0004060E000408000004080
      20004080400040806000408080004080A0004080C0004080E00040A0000040A0
      200040A0400040A0600040A0800040A0A00040A0C00040A0E00040C0000040C0
      200040C0400040C0600040C0800040C0A00040C0C00040C0E00040E0000040E0
      200040E0400040E0600040E0800040E0A00040E0C00040E0E000800000008000
      20008000400080006000800080008000A0008000C0008000E000802000008020
      20008020400080206000802080008020A0008020C0008020E000804000008040
      20008040400080406000804080008040A0008040C0008040E000806000008060
      20008060400080606000806080008060A0008060C0008060E000808000008080
      20008080400080806000808080008080A0008080C0008080E00080A0000080A0
      200080A0400080A0600080A0800080A0A00080A0C00080A0E00080C0000080C0
      200080C0400080C0600080C0800080C0A00080C0C00080C0E00080E0000080E0
      200080E0400080E0600080E0800080E0A00080E0C00080E0E000C0000000C000
      2000C0004000C0006000C0008000C000A000C000C000C000E000C0200000C020
      2000C0204000C0206000C0208000C020A000C020C000C020E000C0400000C040
      2000C0404000C0406000C0408000C040A000C040C000C040E000C0600000C060
      2000C0604000C0606000C0608000C060A000C060C000C060E000C0800000C080
      2000C0804000C0806000C0808000C080A000C080C000C080E000C0A00000C0A0
      2000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0E000C0C00000C0C0
      2000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0A000808080000000
      FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FF0909FFFFFF
      FFFFFF0707070707070707070707070707070707070707070708EC9B9AEC09FF
      FFFF080707070707070707070707070707EEEDEEEDEDEDEDED07E3ECE3E29AED
      F6FF0808F6F6F6F6F6F60808080808080807070707070707ED07090909EBE39A
      9BF50709F6F6F6F6F6F60808080808080808070707070707ED07FFFFEC0909E3
      E3DA9AEDF6F6F60807F707ED07070707ED07080707070707ED07FFFFFFF6EC09
      09E3E39AA307F607ED0808070707070707ED080808070707ED07FFFFFFFFFF09
      EC09ECE39B9B07EDEDEDF70707EDEDEDED07F7F7ED070707ED07FFFFFFFFFFFF
      FF0909EC9B9CA407F6F6F608070707070707080707070707ED07FFFFFFFFFFFF
      FFFF09EDF7A549A4F7F7F7F7F707EDF7F7A4F7F708080707ED07FFFFFFFFFFFF
      FFFF0808F6F6F608F6F6F6F60808F6070808080809090908ED07FFFFFFFFFFFF
      FFFF080808080808F6F6F6F6F6F608080808080709E4E409F507FFFFFFFFFFF6
      08AC63A3A3A36363A3ACF508F6F6F60808080807EDE4EDE40707FFFFFFF60863
      ACB4BDB5B5B5B5B4B4AB62A307F6F6F608080807074A53F6EE07FFFFF6ACACB5
      B4ABABB4F5BDB5B4B4B4B4AC62F7F6F60808F6075B5CA507EE07FFF6ACB4B4AB
      08F60808F6F6F6F6F608B4B4B462F5F6F6F6F607079B9CF6EE07F608B4B4ACF6
      F608ACF708F607B5F708F608AB6BACF6F6F6F608080808070707F66BB46BF608
      626B6B6259626A6A62595AACACACF7F7F7F7F7F7F7F7F7F7F7FF08AB6B08F663
      B3736B6A6B73737373AB636308FFFFFFFFFFFFFFFFFFFFFFFFFFBD6B63F6BD6B
      736AF6F6B473736AB4B46B6BA3F6FFFFFFFFFFFFFFFFFFFFFFFF736BACF66A73
      6AB5F6F6F66B726AACF6BD6B62B5FFFFFFFFFFFFFFFFFFFFFFFF736BACF66A6A
      62BDF6FFF6086A6A63F6F66B6B62F6FFFFFFFFFFFFFFFFFFFFFF73B4ACF6B46A
      62B4F6FFFFF6696A62F6F6086A6208FFFFFFFFFFFFFFFFFFFFFFBDB4A3F608B4
      B463F6FFFFF6216A6208F6F6616108FFFFFFFFFFFFFFFFFFFFFF08B56308F6B4
      B46208FFFFF66A726BB5FFF66A6107FFFFFFFFFFFFFFFFFFFFFF08B5ABF5F6B5
      BDB46308F608BCBCB4ACFFF6B4AB08FFFFFFFFFFFFFFFFFFFFFFF6ACF563F6F6
      B4BDB56363B4BDBDF563F608BD6BF6FFFFFFFFFFFFFFFFFFFFFFF60808ACACF6
      F6B5080808B5AC0808A3F6AC08A3F6FFFFFFFFFFFFFFFFFFFFFFFFF6B508A4AC
      F6F6F60808F6F6F6F608B508B508FFFFFFFFFFFFFFFFFFFFFFFFFFFFF6B508AC
      63F5F6F6F6F6F6F608AC0808ACFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6B508
      08ACA3A3A4A4A4A3B50808ACFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF608
      B50808080808080808F707FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6
      F6F608080808080808F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
    OnClick = SpeedButton2Click
  end
  object rgTipo: TRadioGroup
    Left = 3
    Top = 2
    Width = 222
    Height = 41
    Caption = 'Tipo de Relat'#243'rio'
    Columns = 3
    ItemIndex = 0
    Items.Strings = (
      'Cartas'
      'Dep'#243'sitos'
      'Comiss'#245'es')
    TabOrder = 0
    OnClick = rgTipoExit
    OnExit = rgTipoExit
  end
  object cmbBancos: TComboBox
    Left = 3
    Top = 63
    Width = 206
    Height = 21
    AutoDropDown = True
    AutoCloseUp = True
    ItemHeight = 13
    TabOrder = 1
    Text = 'Todos'
  end
  object cmbAgentes: TComboBox
    Left = 3
    Top = 103
    Width = 206
    Height = 21
    ItemHeight = 13
    TabOrder = 2
    Text = 'Todos'
  end
  object bbOK: TBitBtn
    Left = 219
    Top = 62
    Width = 65
    Height = 25
    Caption = 'OK'
    Default = True
    TabOrder = 3
    OnClick = bbOKClick
    Glyph.Data = {
      DE010000424DDE01000000000000760000002800000024000000120000000100
      0400000000006801000000000000000000001000000000000000000000000000
      80000080000000808000800000008000800080800000C0C0C000808080000000
      FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
      3333333333333333333333330000333333333333333333333333F33333333333
      00003333344333333333333333388F3333333333000033334224333333333333
      338338F3333333330000333422224333333333333833338F3333333300003342
      222224333333333383333338F3333333000034222A22224333333338F338F333
      8F33333300003222A3A2224333333338F3838F338F33333300003A2A333A2224
      33333338F83338F338F33333000033A33333A222433333338333338F338F3333
      0000333333333A222433333333333338F338F33300003333333333A222433333
      333333338F338F33000033333333333A222433333333333338F338F300003333
      33333333A222433333333333338F338F00003333333333333A22433333333333
      3338F38F000033333333333333A223333333333333338F830000333333333333
      333A333333333333333338330000333333333333333333333333333333333333
      0000}
    NumGlyphs = 2
  end
  object bbFechar: TBitBtn
    Left = 219
    Top = 102
    Width = 65
    Height = 25
    Caption = '&Fechar'
    TabOrder = 4
    Kind = bkClose
  end
  object mskPeriodo: TMaskEdit
    Left = 235
    Top = 19
    Width = 49
    Height = 21
    CharCase = ecUpperCase
    EditMask = 'AAA\/00;0; '
    MaxLength = 6
    TabOrder = 5
  end
  object cmbCidades: TComboBox
    Left = 3
    Top = 143
    Width = 150
    Height = 21
    Enabled = False
    ItemHeight = 13
    TabOrder = 6
    Text = 'Todas'
  end
  object rgTipoInf: TRadioGroup
    Left = 160
    Top = 130
    Width = 129
    Height = 41
    Caption = 'Tipo de Informa'#231#227'o'
    Columns = 2
    ItemIndex = 0
    Items.Strings = (
      'Cr'#233'ditos'
      'Guias')
    TabOrder = 7
    OnClick = rgTipoExit
    OnExit = rgTipoExit
  end
  object BitBtn1: TBitBtn
    Left = 3
    Top = 173
    Width = 118
    Height = 26
    Caption = 'Gerar OP'
    Default = True
    TabOrder = 8
    OnClick = BitBtn1Click
    Glyph.Data = {
      76010000424D7601000000000000760000002800000020000000100000000100
      04000000000000010000120B0000120B00001000000000000000000000000000
      800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
      FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00300000000000
      0000377777777777777707FFFFFFFFFFFF70773FF33333333F770F77FFFFFFFF
      77F07F773FFFFFFF77F70FFF7700000000007F337777777777770FFFFF0FFFFF
      FFF07F333F7F3FFFF3370FFF700F0000FFF07F3F777F777733370F707F0FFFFF
      FFF07F77337F3FFFFFF7007EEE0F000000F077FFFF7F777777370777770FFFFF
      FFF07777777F3FFFFFF7307EEE0F000000F03773FF7F7777773733707F0FFFFF
      FFF03337737F3FFF33373333700F000FFFF03333377F77733FF73333330FFFFF
      00003333337F3FF377773333330F00FF0F033333337F77337F733333330FFFFF
      00333333337FFFFF773333333300000003333333337777777333}
    NumGlyphs = 2
  end
  object Button1: TButton
    Left = 228
    Top = 208
    Width = 86
    Height = 25
    Caption = 'ImportaDados'
    TabOrder = 9
    Visible = False
    OnClick = Button1Click
  end
  object BitBtn2: TBitBtn
    Left = 227
    Top = 238
    Width = 86
    Height = 25
    Caption = 'Update SitOp'
    Default = True
    TabOrder = 10
    Visible = False
    OnClick = BitBtn2Click
    Glyph.Data = {
      76010000424D7601000000000000760000002800000020000000100000000100
      04000000000000010000120B0000120B00001000000000000000000000000000
      800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
      FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00300000000000
      0000377777777777777707FFFFFFFFFFFF70773FF33333333F770F77FFFFFFFF
      77F07F773FFFFFFF77F70FFF7700000000007F337777777777770FFFFF0FFFFF
      FFF07F333F7F3FFFF3370FFF700F0000FFF07F3F777F777733370F707F0FFFFF
      FFF07F77337F3FFFFFF7007EEE0F000000F077FFFF7F777777370777770FFFFF
      FFF07777777F3FFFFFF7307EEE0F000000F03773FF7F7777773733707F0FFFFF
      FFF03337737F3FFF33373333700F000FFFF03333377F77733FF73333330FFFFF
      00003333337F3FF377773333330F00FF0F033333337F77337F733333330FFFFF
      00333333337FFFFF773333333300000003333333337777777333}
    NumGlyphs = 2
  end
  object qryGeral: TADOQuery
    Connection = FormPrincipal.cnRegente
    CursorType = ctStatic
    CommandTimeout = 60
    Parameters = <>
    SQL.Strings = (
      
        'SELECT CAST(G.GRUPO_CODIGO AS CHAR(5))+'#39' - '#39'+G.GRUPO_DESCRICAO A' +
        'S NOME FROM GRUPO G'
      'INNER JOIN FRANGRUPO FG ON (FG.GRUPO_CODIGO=G.GRUPO_CODIGO)'
      'GROUP BY G.GRUPO_CODIGO, G.GRUPO_DESCRICAO'
      'HAVING (COUNT(G.GRUPO_CODIGO)>1)'
      'ORDER BY G.GRUPO_CODIGO, G.GRUPO_DESCRICAO')
    Left = 256
  end
  object QryUpdate: TADOQuery
    Connection = FormPrincipal.cnRegente
    Parameters = <
      item
        Name = 'Param1'
        DataType = ftDateTime
        NumericScale = 3
        Precision = 23
        Size = 16
        Value = Null
      end
      item
        Name = 'Param2'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 20
        Value = Null
      end
      item
        Name = 'Param3'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 11
        Value = Null
      end
      item
        Name = 'Param4'
        Attributes = [paNullable]
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 50
        Value = Null
      end
      item
        Name = 'Param5'
        Attributes = [paSigned]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end>
    SQL.Strings = (
      
        'update grupo set grupo_nascimento = :dtnascimento, grupo_identid' +
        'ade = :rg, grupo_cpf = :cpf, grupo_proprietario = :proprietario'
      'where grupo_codigo = :codigo')
    Left = 280
    Top = 160
  end
  object QryGrupo: TADOQuery
    Connection = FormPrincipal.cnRegente
    Parameters = <
      item
        Name = 'pos'
        Attributes = [paSigned]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end>
    SQL.Strings = (
      'select grupo_codigo from grupo where grupo_codigo = :pos')
    Left = 192
    Top = 168
  end
  object QryAgenda: TADOQuery
    ConnectionString = 
      'Provider=SQLOLEDB.1;Password=infocraft;Persist Security Info=Tru' +
      'e;User ID=sa;Initial Catalog=CALLCENTER;Data Source=dbnovo'
    Parameters = <>
    SQL.Strings = (
      
        'select ag.pos, ad.nome, ad.apelido, ad.aniversario, ad.cpf, ad.r' +
        'g'
      'from agendadependentes ad, agenda ag'
      'where ad.codagenda = ag.codigo and'
      
        '      ad.parentesco = '#39'PROPRIET'#193'RIO(A)'#39' and ad.cpf is not null a' +
        'nd ad.rg is not null and ad.aniversario is not null and ag.pos i' +
        's not null'
      'order by ag.pos')
    Left = 240
    Top = 168
    object QryAgendapos: TIntegerField
      FieldName = 'pos'
    end
    object QryAgendanome: TStringField
      FieldName = 'nome'
      Size = 50
    end
    object QryAgendaapelido: TStringField
      FieldName = 'apelido'
      Size = 15
    end
    object QryAgendaaniversario: TDateTimeField
      FieldName = 'aniversario'
    end
    object QryAgendacpf: TStringField
      FieldName = 'cpf'
      Size = 11
    end
    object QryAgendarg: TStringField
      FieldName = 'rg'
      Size = 15
    end
  end
  object QryUpdateSitOp: TADOQuery
    Connection = FormPrincipal.cnRegente
    Parameters = <
      item
        Name = 'PERIODO'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 5
        Value = Null
      end>
    SQL.Strings = (
      'UPDATE COMISSAO SET COMISSAO_OPSITUACAO = '#39'G'#39' '
      'WHERE  COMISSAO_PERIODO        = :PERIODO AND'
      '              COMISSAO_NDEPOSITAR <> '#39'S'#39'             AND '
      '              COMISSAO_OPSITUACAO  = '#39'N'#39)
    Left = 176
    Top = 40
  end
  object IdSMTP: TIdSMTP
    MaxLineAction = maException
    ReadTimeout = 0
    Port = 25
    AuthenticationType = atLogin
    Left = 24
    Top = 24
  end
  object IdMensagem: TIdMessage
    AttachmentEncoding = 'MIME'
    BccList = <>
    CCList = <>
    Encoding = meMIME
    Recipients = <>
    ReplyTo = <>
    Left = 81
    Top = 24
  end
  object qryComissaoGuias: TADOQuery
    Connection = FormPrincipal.cnRegente
    Parameters = <
      item
        Name = 'periodo'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 5
        Value = Null
      end
      item
        Name = 'grupo'
        Attributes = [paSigned]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end>
    SQL.Strings = (
      
        'SELECT V.*, V.TOTAL-ISS AS SUBTOTAL, C.CARTA_OBS, C.CARTA_AVISO,' +
        ' G.GRUPO_EMAIL, G.GRUPO_EMAIL1,G.GRUPO_ATT, G.GRUPO_DESCRICAO, C' +
        'OMISSAO_NDEPOSITAR'
      'FROM V_COMISSAOGUIAS V, CARTA C, GRUPO G'
      'WHERE (V.COMISSAO_PERIODO=:periodo) AND '
      'G.GRUPO_CODIGO =:grupo AND '
      'V.COMISSAO_PERIODO = C.COMISSAO_PERIODO AND'
      'V.GRUPO_CODIGO = G.GRUPO_CODIGO'
      'ORDER BY V.GRUPO_CODIGO, V.FRANQUIA_CODIGO')
    Left = 184
    Top = 238
    object qryComissaoGuiasGRUPO_CODIGO: TIntegerField
      FieldName = 'GRUPO_CODIGO'
    end
    object qryComissaoGuiasCOMISSAO_PERIODO: TStringField
      FieldName = 'COMISSAO_PERIODO'
      FixedChar = True
      Size = 5
    end
    object qryComissaoGuiasFRANQUIA_CODIGO: TIntegerField
      FieldName = 'FRANQUIA_CODIGO'
    end
    object qryComissaoGuiasMEDIA: TFloatField
      FieldName = 'MEDIA'
    end
    object qryComissaoGuiasCOMISSAO_NDEPOSITAR: TStringField
      FieldName = 'COMISSAO_NDEPOSITAR'
      FixedChar = True
      Size = 1
    end
    object qryComissaoGuiasCOMISSAO_AJUSTES: TBCDField
      FieldName = 'COMISSAO_AJUSTES'
      Precision = 19
    end
    object qryComissaoGuiasCOMISSAO_GARANTIA: TBCDField
      FieldName = 'COMISSAO_GARANTIA'
      Precision = 19
    end
    object qryComissaoGuiasCOMISSAO_ISS: TBCDField
      FieldName = 'COMISSAO_ISS'
      Precision = 19
    end
    object qryComissaoGuiasCARTA_DATAINI: TDateTimeField
      FieldName = 'CARTA_DATAINI'
    end
    object qryComissaoGuiasCARTA_DATAFIM: TDateTimeField
      FieldName = 'CARTA_DATAFIM'
    end
    object qryComissaoGuiasCARTA_GERACAO: TDateTimeField
      FieldName = 'CARTA_GERACAO'
    end
    object qryComissaoGuiasCARTA_CREDITO: TDateTimeField
      FieldName = 'CARTA_CREDITO'
    end
    object qryComissaoGuiasCARTA_OBS: TMemoField
      FieldName = 'CARTA_OBS'
      ReadOnly = True
      BlobType = ftMemo
    end
    object qryComissaoGuiasCARTA_PAGO: TBooleanField
      FieldName = 'CARTA_PAGO'
    end
    object qryComissaoGuiasFRANQUIA: TStringField
      FieldName = 'FRANQUIA'
      ReadOnly = True
      Size = 63
    end
    object qryComissaoGuiasQTDOPBMC: TIntegerField
      FieldName = 'QTDOPBMC'
    end
    object qryComissaoGuiasTOTALOPBMC: TBCDField
      FieldName = 'TOTALOPBMC'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoGuiasQTDOPFAUESPI: TIntegerField
      FieldName = 'QTDOPFAUESPI'
      ReadOnly = True
    end
    object qryComissaoGuiasTOTALOPEFAUESPI: TBCDField
      FieldName = 'TOTALOPEFAUESPI'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoGuiasBBQTD: TIntegerField
      FieldName = 'BBQTD'
    end
    object qryComissaoGuiasBBTOTAL: TBCDField
      FieldName = 'BBTOTAL'
      Precision = 19
    end
    object qryComissaoGuiasBBQTD1: TIntegerField
      FieldName = 'BBQTD1'
    end
    object qryComissaoGuiasBBTOTAL1: TBCDField
      FieldName = 'BBTOTAL1'
      Precision = 19
    end
    object qryComissaoGuiasGUIAS: TIntegerField
      FieldName = 'GUIAS'
    end
    object qryComissaoGuiasVALGUIAS: TFloatField
      FieldName = 'VALGUIAS'
      ReadOnly = True
    end
    object qryComissaoGuiasISS: TFloatField
      FieldName = 'ISS'
      ReadOnly = True
    end
    object qryComissaoGuiasQTDTOTAL: TIntegerField
      FieldName = 'QTDTOTAL'
      ReadOnly = True
    end
    object qryComissaoGuiasTOTAL: TFloatField
      FieldName = 'TOTAL'
      ReadOnly = True
    end
    object qryComissaoGuiasSUBTOTAL: TFloatField
      FieldName = 'SUBTOTAL'
      ReadOnly = True
    end
    object qryComissaoGuiasCARTA_OBS_1: TMemoField
      FieldName = 'CARTA_OBS_1'
      BlobType = ftMemo
    end
    object qryComissaoGuiasCARTA_AVISO: TMemoField
      FieldName = 'CARTA_AVISO'
      BlobType = ftMemo
    end
    object qryComissaoGuiasGRUPO_EMAIL: TStringField
      FieldName = 'GRUPO_EMAIL'
      Size = 100
    end
    object qryComissaoGuiasGRUPO_ATT: TStringField
      FieldName = 'GRUPO_ATT'
      Size = 30
    end
    object qryComissaoGuiasGRUPO_DESCRICAO: TStringField
      FieldName = 'GRUPO_DESCRICAO'
      Size = 50
    end
    object qryComissaoGuiasCOMISSAO_NDEPOSITAR_1: TStringField
      FieldName = 'COMISSAO_NDEPOSITAR_1'
      FixedChar = True
      Size = 1
    end
    object qryComissaoGuiasGRUPO_EMAIL1: TStringField
      FieldName = 'GRUPO_EMAIL1'
      Size = 100
    end
  end
  object qryAjusteGrupo: TADOQuery
    Connection = FormPrincipal.cnRegente
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'GRUPO_CODIGO'
        Attributes = [paSigned]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end>
    SQL.Strings = (
      'SELECT * FROM AJUSTEGRUPO'
      'WHERE GRUPO_CODIGO=:GRUPO_CODIGO')
    Left = 240
    Top = 264
    object qryAjusteGrupoGRUPO_CODIGO: TIntegerField
      FieldName = 'GRUPO_CODIGO'
    end
    object qryAjusteGrupoAJUSTEGRUPO_DESCRICAO: TStringField
      DisplayLabel = 'Descri'#231#227'o'
      FieldName = 'AJUSTEGRUPO_DESCRICAO'
      Size = 30
    end
    object qryAjusteGrupoAJUSTEGRUPO_VALOR: TBCDField
      DisplayLabel = 'Valor'
      FieldName = 'AJUSTEGRUPO_VALOR'
      currency = True
      Precision = 19
    end
    object qryAjusteGrupoAJUSTEGRUPO_CREDITO: TBooleanField
      DisplayLabel = 'C'
      FieldName = 'AJUSTEGRUPO_CREDITO'
    end
  end
  object qryComissaoCreditos: TADOQuery
    Connection = FormPrincipal.cnRegente
    Parameters = <
      item
        Name = 'grupo'
        Size = -1
        Value = Null
      end
      item
        Name = 'periodo'
        Size = -1
        Value = Null
      end>
    SQL.Strings = (
      '--CREDITOS E RECARGAS--'
      'SELECT  '
      
        ' C.GRUPO_CODIGO, FRANQUIA_CODIGO, C.GRUPO_ATT, C.GRUPO_DESCRICAO' +
        ', C.COMISSAO_PERIODO, C.COMISSAO_EMAIL, '
      
        '(SELECT GRUPO_EMAIL1 FROM GRUPO GR WHERE GR.GRUPO_CODIGO = C.GRU' +
        'PO_CODIGO) AS GRUPO_EMAIL1,'
      ' COMISSAO_AJUSTES,COMISSAO_NDEPOSITAR,'
      ' FC.CLARO, (CLARO*(GRUPO_CREDIGI/100)) AS COMISSCLARO,'
      ' FC.OI, (OI*(GRUPO_OI/100)) AS COMISSOI,'
      
        ' FC.VIVORECARGA, (VIVORECARGA*(COMISSAO_VIVORECARGA/100)) AS COM' +
        'ISSVIVOREC,'
      
        '(FC.EMBLDR + FC.EMBLIVRE) AS LDRLIVRE, ((EMBLDR*(GRUPO_EMBRATELL' +
        'DR/100))+(EMBLIVRE*(GRUPO_EMBRATELLIVRE/100))) AS COMEMBRATEL,'
      
        '(FC.AMAZONIARECARGA + FC.MINASGAS) AS VALEGAS, ((VALEGAS*(COMISS' +
        'AO_NACIONALGAS/100))+(MINASGAS*(COMISSAO_MINASGAS/100))) AS COMI' +
        'SSVALEGAS,'
      
        '----------------------------------------------------------------' +
        '--------------------------------------------------------'
      
        ' (FC.CLARORECARGA + FC.CLARORECARGADIRETO) AS CLARORECARGA, ((CL' +
        'ARORECARGA*(COMISSAO_CLARORECARGA/100)) + (CLARORECARGADIRETO*(C' +
        'OMISSAO_CLARORECARGADIRETO/100)) ) AS COMISSCLAROREC,  --<<<<<<<' +
        '<<<<<<<<<<<<'
      
        '----------------------------------------------------------------' +
        '--------------------------------------------------------'
      
        ' FC.OIRECARGA, (OIRECARGA*(COMISSAO_OIRECARGA/100)) AS COMISSOIR' +
        'EC,'
      '(CLARO+OI+EMBLDR+EMBLIVRE+VALEGAS+MINASGAS) AS VENDACRED, '
      
        '((CLARO*(GRUPO_CREDIGI/100))+(OI*(GRUPO_OI/100))+(EMBLDR*(GRUPO_' +
        'EMBRATELLDR/100))+(EMBLIVRE*(GRUPO_EMBRATELLIVRE/100))+(VALEGAS*' +
        '(COMISSAO_NACIONALGAS/100))+(MINASGAS*(COMISSAO_MINASGAS/100))) ' +
        'AS COMISSTOTCRED,'
      
        '----------------------------------------------------------------' +
        '--------------------------------------------------------'
      
        '((OIRECARGA*COMISSAO_OIRECARGA)+(VIVORECARGA*COMISSAO_VIVORECARG' +
        'A)+'
      
        '(CLARORECARGA*COMISSAO_CLARORECARGA)+(CLARORECARGADIRETO*COMISSA' +
        'O_CLARORECARGADIRETO)+(AMAZONIARECARGA*COMISSAO_AMAZONIARECARGA)' +
        ')/100 AS COMISSAORECARGA,'
      
        'CLARO+OI+TIM+EMBLDR+EMBLIVRE+oirecarga+vivorecarga+clarorecarga+' +
        'amazoniarecarga+(VALEGAS*NACIONALGAS_VALOR)'
      '+(MINASGAS*MINASGAS_VALOR)+VENDASETUT AS TOTALRECARGA,'
      
        '----------------------------------------------------------------' +
        '--------------------------------------------------------'
      
        '(((VENDASETUT*COMISSAO_SETUT)+(CLARO*GRUPO_CREDIGI)+(OI*GRUPO_OI' +
        ')+(TIM*GRUPO_TIM)+(EMBLDR*GRUPO_EMBRATELLDR)+(EMBLIVRE*GRUPO_EMB' +
        'RATELLIVRE)+'
      
        '(OIRECARGA*COMISSAO_OIRECARGA)+(VIVORECARGA*COMISSAO_VIVORECARGA' +
        ')+(CLARORECARGA*COMISSAO_CLARORECARGA)+(CLARORECARGADIRETO*COMIS' +
        'SAO_CLARORECARGADIRETO)+'
      '(AMAZONIARECARGA*COMISSAO_AMAZONIARECARGA))/100)'
      
        '+((VALEGAS*COMISSAO_NACIONALGAS)+(MINASGAS*COMISSAO_MINASGAS)) A' +
        'S TOTALCOMISSAO,'
      
        '----------------------------------------------------------------' +
        '--------------------------------------------------------'
      
        '(((((CLARO*GRUPO_CREDIGI)+(OI*GRUPO_OI)+(TIM*GRUPO_TIM)+(EMBLDR*' +
        'GRUPO_EMBRATELLDR)+(EMBLIVRE*GRUPO_EMBRATELLIVRE)+'
      
        '+(OIRECARGA*COMISSAO_OIRECARGA)+(VIVORECARGA*COMISSAO_VIVORECARG' +
        'A)+(CLARORECARGA*COMISSAO_CLARORECARGA)+(CLARORECARGADIRETO*COMI' +
        'SSAO_CLARORECARGADIRETO)+'
      
        '(AMAZONIARECARGA*COMISSAO_AMAZONIARECARGA))/100)+((VALEGAS*COMIS' +
        'SAO_NACIONALGAS)+(VENDASETUT*COMISSAO_SETUT)+(MINASGAS*COMISSAO_' +
        'MINASGAS)))*COMISSAO_ISS)/100 AS ISS,'
      
        '----------------------------------------------------------------' +
        '--------------------------------------------------------'
      
        '(((CLARO*GRUPO_CREDIGI)+(VENDASETUT*COMISSAO_SETUT)+(OI*GRUPO_OI' +
        ')+(TIM*GRUPO_TIM)+(EMBLDR*GRUPO_EMBRATELLDR)+(EMBLIVRE*GRUPO_EMB' +
        'RATELLIVRE)+'
      
        '(OIRECARGA*COMISSAO_OIRECARGA)+(VIVORECARGA*COMISSAO_VIVORECARGA' +
        ')+(CLARORECARGA*COMISSAO_CLARORECARGA)+(CLARORECARGADIRETO*COMIS' +
        'SAO_CLARORECARGADIRETO)+'
      '(AMAZONIARECARGA*COMISSAO_AMAZONIARECARGA))/100)'
      
        '+((VALEGAS*COMISSAO_NACIONALGAS)+(MINASGAS*COMISSAO_MINASGAS))-(' +
        '(((CLARO*GRUPO_CREDIGI)+(VENDASETUT*COMISSAO_SETUT)+(OI*GRUPO_OI' +
        ')+(TIM*GRUPO_TIM)+(EMBLDR*GRUPO_EMBRATELLDR)+(EMBLIVRE*GRUPO_EMB' +
        'RATELLIVRE)+'
      
        '((VALEGAS*COMISSAO_NACIONALGAS)+(MINASGAS*COMISSAO_MINASGAS))+(O' +
        'IRECARGA*COMISSAO_OIRECARGA)'
      
        '+(VIVORECARGA*COMISSAO_VIVORECARGA)+(CLARORECARGA*COMISSAO_CLARO' +
        'RECARGA)+(CLARORECARGADIRETO*COMISSAO_CLARORECARGADIRETO)+'
      
        '(AMAZONIARECARGA*COMISSAO_AMAZONIARECARGA))*COMISSAO_ISS)/10000)' +
        ' AS SUBTOTAL'
      
        'FROM CARTA A INNER JOIN COMISSAO C ON (C.COMISSAO_PERIODO=A.COMI' +
        'SSAO_PERIODO)'
      'INNER JOIN FRANCOMISSAO FC ON (FC.GRUPO_CODIGO=C.GRUPO_CODIGO)'
      'AND (FC.COMISSAO_PERIODO=C.COMISSAO_PERIODO)'
      
        'WHERE (FC.GRUPO_CODIGO =:grupo) AND (A.COMISSAO_PERIODO=:periodo' +
        ') '
      'ORDER BY FC.GRUPO_CODIGO, FC.FRANQUIA_CODIGO')
    Left = 32
    Top = 232
    object qryComissaoCreditosGRUPO_CODIGO: TIntegerField
      FieldName = 'GRUPO_CODIGO'
    end
    object qryComissaoCreditosGRUPO_ATT: TStringField
      FieldName = 'GRUPO_ATT'
      Size = 30
    end
    object qryComissaoCreditosGRUPO_DESCRICAO: TStringField
      FieldName = 'GRUPO_DESCRICAO'
      Size = 50
    end
    object qryComissaoCreditosCOMISSAO_PERIODO: TStringField
      FieldName = 'COMISSAO_PERIODO'
      FixedChar = True
      Size = 5
    end
    object qryComissaoCreditosCOMISSAO_EMAIL: TStringField
      FieldName = 'COMISSAO_EMAIL'
      Size = 100
    end
    object qryComissaoCreditosCLARO: TBCDField
      FieldName = 'CLARO'
      Precision = 19
    end
    object qryComissaoCreditosCOMISSCLARO: TBCDField
      FieldName = 'COMISSCLARO'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosOI: TBCDField
      FieldName = 'OI'
      Precision = 19
    end
    object qryComissaoCreditosCOMISSOI: TBCDField
      FieldName = 'COMISSOI'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosLDRLIVRE: TBCDField
      FieldName = 'LDRLIVRE'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosCOMEMBRATEL: TBCDField
      FieldName = 'COMEMBRATEL'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosVALEGAS: TBCDField
      FieldName = 'VALEGAS'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosCOMISSVALEGAS: TBCDField
      FieldName = 'COMISSVALEGAS'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosCLARORECARGA: TBCDField
      FieldName = 'CLARORECARGA'
      Precision = 19
    end
    object qryComissaoCreditosCOMISSCLAROREC: TBCDField
      FieldName = 'COMISSCLAROREC'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosOIRECARGA: TBCDField
      FieldName = 'OIRECARGA'
      Precision = 19
    end
    object qryComissaoCreditosCOMISSOIREC: TBCDField
      FieldName = 'COMISSOIREC'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosVIVORECARGA: TBCDField
      FieldName = 'VIVORECARGA'
      Precision = 19
    end
    object qryComissaoCreditosCOMISSVIVOREC: TBCDField
      FieldName = 'COMISSVIVOREC'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosCOMISSAORECARGA: TBCDField
      FieldName = 'COMISSAORECARGA'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosTOTALRECARGA: TBCDField
      FieldName = 'TOTALRECARGA'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosTOTALCOMISSAO: TBCDField
      FieldName = 'TOTALCOMISSAO'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosISS: TBCDField
      FieldName = 'ISS'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosSUBTOTAL: TBCDField
      FieldName = 'SUBTOTAL'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosVENDACRED: TBCDField
      FieldName = 'VENDACRED'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosCOMISSTOTCRED: TBCDField
      FieldName = 'COMISSTOTCRED'
      ReadOnly = True
      Precision = 19
    end
    object qryComissaoCreditosCOMISSAO_AJUSTES: TBCDField
      FieldName = 'COMISSAO_AJUSTES'
      Precision = 19
    end
    object qryComissaoCreditosFRANQUIA_CODIGO: TIntegerField
      FieldName = 'FRANQUIA_CODIGO'
    end
    object qryComissaoCreditosCOMISSAO_NDEPOSITAR: TStringField
      FieldName = 'COMISSAO_NDEPOSITAR'
      FixedChar = True
      Size = 1
    end
    object qryComissaoCreditosGRUPO_EMAIL1: TStringField
      FieldName = 'GRUPO_EMAIL1'
      ReadOnly = True
      Size = 100
    end
  end
  object qryAjusteGrupoCred: TADOQuery
    Connection = FormPrincipal.cnRegente
    Parameters = <
      item
        Name = 'GRUPO_CODIGO'
        Attributes = [paSigned]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = Null
      end>
    SQL.Strings = (
      'SELECT * FROM AJUSTEGRUPO'
      'WHERE GRUPO_CODIGO=:GRUPO_CODIGO AND AJUSTEGRUPO_CREDITO = 1')
    Left = 64
    Top = 264
    object qryAjusteGrupoCredGRUPO_CODIGO: TIntegerField
      FieldName = 'GRUPO_CODIGO'
    end
    object qryAjusteGrupoCredAJUSTEGRUPO_DESCRICAO: TStringField
      FieldName = 'AJUSTEGRUPO_DESCRICAO'
      Size = 30
    end
    object qryAjusteGrupoCredAJUSTEGRUPO_VALOR: TBCDField
      FieldName = 'AJUSTEGRUPO_VALOR'
      Precision = 19
    end
    object qryAjusteGrupoCredAJUSTEGRUPO_CREDITO: TBooleanField
      FieldName = 'AJUSTEGRUPO_CREDITO'
    end
  end
  object qryGrupoCreditos: TADOQuery
    Connection = FormPrincipal.cnRegente
    Parameters = <
      item
        Name = 'periodo'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 5
        Value = Null
      end>
    SQL.Strings = (
      'select distinct(grupo_codigo)'
      'from FRANCOMISSAO '
      
        'where comissao_periodo =:periodo and grupo_codigo not in ('#39'2050'#39 +
        ') and'
      
        'FRANQUIA_CODIGO IN (SELECT GRUPO_CODIGO FROM GRUPO WHERE GRUPO_E' +
        'MAIL IS NOT NULL AND GRUPO_EMAIL <> '#39#39')')
    Left = 48
    Top = 248
    object qryGrupoCreditosgrupo_codigo: TIntegerField
      FieldName = 'grupo_codigo'
    end
  end
  object qryGrupoGuias: TADOQuery
    Connection = FormPrincipal.cnRegente
    Parameters = <
      item
        Name = 'periodo'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 5
        Value = Null
      end>
    SQL.Strings = (
      'SELECT DISTINCT GRUPO_CODIGO'
      'FROM V_COMISSAOGUIAS '
      'WHERE COMISSAO_PERIODO=:periodo AND '
      '      GRUPO_CODIGO not in (2050) AND '
      
        '      FRANQUIA_CODIGO IN (SELECT GRUPO_CODIGO FROM GRUPO WHERE G' +
        'RUPO_EMAIL IS NOT NULL AND GRUPO_EMAIL <> '#39#39')'
      'ORDER BY GRUPO_CODIGO')
    Left = 209
    Top = 252
    object qryGrupoGuiasGRUPO_CODIGO: TIntegerField
      FieldName = 'GRUPO_CODIGO'
    end
  end
  object qryConsulta: TADOQuery
    Connection = FormPrincipal.cnRegente
    CommandTimeout = 90
    Parameters = <
      item
        Name = 'PERIODO'
        DataType = ftString
        NumericScale = 10
        Precision = 10
        Size = 10
        Value = Null
      end>
    SQL.Strings = (
      
        'select *,GUIAS+OPS+BBCONVENIOS+BBTITULOS+CREDITOS+RECARGA+VALEGA' +
        'S AS bruto,'
      
        '(GUIAS+OPS+BBCONVENIOS+BBTITULOS+CREDITOS+RECARGA+VALEGAS+COMISS' +
        'AO_AJUSTES-'
      
        '((GUIAS+OPS+BBCONVENIOS+BBTITULOS+CREDITOS+RECARGA+VALEGAS)*ISS)' +
        ') AS LIQUIDO from V_OPSNAOENVIADAS'
      'where COMISSAO_PERIODO =:PERIODO'
      'order by COMISSAO_PERIODO, GRUPO_CODIGO')
    Left = 88
    Top = 128
    object qryConsultaCOMISSAO_PERIODO: TStringField
      FieldName = 'COMISSAO_PERIODO'
      FixedChar = True
      Size = 5
    end
    object qryConsultaGRUPO_CODIGO: TIntegerField
      FieldName = 'GRUPO_CODIGO'
    end
    object qryConsultaGRUPO_DESCRICAO: TStringField
      FieldName = 'GRUPO_DESCRICAO'
      Size = 50
    end
    object qryConsultaCOMISSAO_PROPRIETARIO: TStringField
      FieldName = 'COMISSAO_PROPRIETARIO'
      Size = 50
    end
    object qryConsultaCOMISSAO_TITULAR: TStringField
      FieldName = 'COMISSAO_TITULAR'
      Size = 50
    end
    object qryConsultaCOMISSAO_GARANTIA: TBCDField
      FieldName = 'COMISSAO_GARANTIA'
      Precision = 19
    end
    object qryConsultaCOMISSAO_NASCIMENTO: TDateTimeField
      FieldName = 'COMISSAO_NASCIMENTO'
    end
    object qryConsultaCOMISSAO_IDENTIDADE: TStringField
      FieldName = 'COMISSAO_IDENTIDADE'
    end
    object qryConsultaCOMISSAO_CPF: TStringField
      FieldName = 'COMISSAO_CPF'
      Size = 11
    end
    object qryConsultaCOMISSAO_ORGAOEMISSOR: TStringField
      FieldName = 'COMISSAO_ORGAOEMISSOR'
    end
    object qryConsultaGUIAS: TFloatField
      FieldName = 'GUIAS'
      ReadOnly = True
    end
    object qryConsultaBBCONVENIOS: TBCDField
      FieldName = 'BBCONVENIOS'
      ReadOnly = True
      Precision = 19
    end
    object qryConsultaBBTITULOS: TBCDField
      FieldName = 'BBTITULOS'
      ReadOnly = True
      Precision = 19
    end
    object qryConsultaOPS: TBCDField
      FieldName = 'OPS'
      ReadOnly = True
      Precision = 19
    end
    object qryConsultaCREDITOS: TBCDField
      FieldName = 'CREDITOS'
      ReadOnly = True
      Precision = 19
    end
    object qryConsultaRECARGA: TBCDField
      FieldName = 'RECARGA'
      ReadOnly = True
      Precision = 19
    end
    object qryConsultaISS: TBCDField
      FieldName = 'ISS'
      ReadOnly = True
      Precision = 19
    end
    object qryConsultaCOMISSAO_AJUSTES: TBCDField
      FieldName = 'COMISSAO_AJUSTES'
      Precision = 19
    end
    object qryConsultaVALEGAS: TBCDField
      FieldName = 'VALEGAS'
      ReadOnly = True
      Precision = 19
    end
    object qryConsultaCD_BANCO_COMPENSACAO: TIntegerField
      FieldName = 'CD_BANCO_COMPENSACAO'
    end
    object qryConsultaTP_INSCRICAO_EMPRESA: TIntegerField
      FieldName = 'TP_INSCRICAO_EMPRESA'
    end
    object qryConsultaNU_INSCRICAO_EMPRESA: TStringField
      FieldName = 'NU_INSCRICAO_EMPRESA'
      Size = 14
    end
    object qryConsultaCD_CONVENIO_BANCO: TStringField
      FieldName = 'CD_CONVENIO_BANCO'
    end
    object qryConsultaNM_EMPRESA: TStringField
      FieldName = 'NM_EMPRESA'
      Size = 30
    end
    object qryConsultaNM_BANCO: TStringField
      FieldName = 'NM_BANCO'
      Size = 30
    end
    object qryConsultaNU_AGENCIA: TStringField
      FieldName = 'NU_AGENCIA'
      Size = 5
    end
    object qryConsultaDV_AGENCIA: TStringField
      FieldName = 'DV_AGENCIA'
      FixedChar = True
      Size = 1
    end
    object qryConsultaNU_CONTA: TStringField
      FieldName = 'NU_CONTA'
      Size = 12
    end
    object qryConsultaDV_CONTA: TStringField
      FieldName = 'DV_CONTA'
      FixedChar = True
      Size = 1
    end
    object qryConsultaDV_AGENCIA_CONTA: TStringField
      FieldName = 'DV_AGENCIA_CONTA'
      FixedChar = True
      Size = 1
    end
    object qryConsultaENDERECO: TStringField
      FieldName = 'ENDERECO'
      Size = 30
    end
    object qryConsultaNUMERO: TIntegerField
      FieldName = 'NUMERO'
    end
    object qryConsultaCOMPLEMENTO: TStringField
      FieldName = 'COMPLEMENTO'
      Size = 15
    end
    object qryConsultaNM_CIDADE: TStringField
      FieldName = 'NM_CIDADE'
    end
    object qryConsultaCEP: TStringField
      FieldName = 'CEP'
      Size = 8
    end
    object qryConsultaUF: TStringField
      FieldName = 'UF'
      FixedChar = True
      Size = 2
    end
    object qryConsultaULT_NSA: TIntegerField
      FieldName = 'ULT_NSA'
    end
    object qryConsultaULT_ID_GERACAO: TIntegerField
      FieldName = 'ULT_ID_GERACAO'
    end
    object qryConsultaDT_ULT_GERACAO: TDateTimeField
      FieldName = 'DT_ULT_GERACAO'
    end
    object qryConsultabruto: TFloatField
      FieldName = 'bruto'
      ReadOnly = True
    end
    object qryConsultaLIQUIDO: TFloatField
      FieldName = 'LIQUIDO'
      ReadOnly = True
    end
  end
end
